package homework.test4;

import homework.test1.Animal;

public class Person {
    private String age;
    private String name;

    public Person() {
    }

    public Person(String age, String name) {
        this.age = age;
        this.name = name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void keepPet(Animals animal, String something){
        System.out.println("年龄为"+this.age+"的"+this.name+"养了一只"
                +animal.getColor()+"的"+animal.getAge()+"的宠物");

        animal.eat(something);
    }
}
